package com.beijiteshop.shop.ui.home

import com.beijiteshop.libcommon.network.RetrofitClient
import com.beijiteshop.shop.ui.home.repo.HomeRepo
import com.beijiteshop.shop.ui.home.repo.HomeService
import com.beijiteshop.shop.ui.home.vm.HomeVM
import org.koin.android.viewmodel.dsl.viewModel
import org.koin.dsl.module

/**
 * @Author LiaoZhongKai
 * @Date 2021/3/1 16:36
 * @Description 配置koin
 */

val homeModule = module {

    single { RetrofitClient }

    single {
        get<RetrofitClient>().getService(HomeService::class.java)
    }

    single { HomeRepo(get()) }

    viewModel { HomeVM(get()) }
}